Techniques for Improving Test-Driven Design

نویسندگان

  • Martin Wirsing
  • Hubert Baumeister
چکیده

Early test development and specification enhance the quality and robustness of software as experience with new agile software development methods shows. The methods propagate test-first techniques and early prototyping through executable design models. For UML, Model-Driven Architecture is oriented towards executable models. Several authors propose scenarios specified by sequence diagrams as test cases for state diagrams; more generally, using software model checking one may automatically verify whether state diagrams or code satisfy properties defined by sequence diagrams. Other approaches use OCL invariants and pre-/post-conditions for instrumenting Java code with assertions. Also, Extreme Programming (XP) requires to write tests before writing the code as a means for making the software robust and more easily refactored. Popular tools for XP are the family of xUnit tools—with JUnit as the most well known instance—for writing automated unit tests and Fit for writing automated acceptance tests. In this paper we propose techniques for extending and improving such test-driven development methods, where executable tests drive the development process. Scenarios and properties serve us as a combined basis for system specification and test cases. Scenarios are defined by sequence diagrams written in a powerful sublanguage of UML 2.0 which allows us to specify not only possible scenarios but also forbidden scenarios (failure traces). A forbidden scenario is a scenario where one wants to say that after legally performing some steps, the next step should now occur. This is not expressible UML 1.5 sequence diagrams. Further extensions w.r.t. other approaches are the use of nested method invocations and state invariants. Scenarios are examples of successful or un-successful system runs. By extracting common properties of several scenarios we obtain invariants and pre-/post-conditions written in OCL or JML. The behaviour of the system is described either by models such as state diagrams or activity diagrams, or by code e.g. written in Java. For testing we insert invariants and preand post-conditions as assertions in the code and the behaviour models. Then we test the instrumented system behaviour with respect to the possible and forbidden scenarios. This is done by translating possible and forbidden scenarios to Fit tests for scenarios involving user interaction and to JUnit tests for system scenarios. Due to the addition of the assertions to the system behaviour we obtain a more complete test coverage and further possibilities for checking dynamically the internal consistency of the system specification. For verification, we propose two approaches: interactive theorem proving combined with symbolic evaluation and model checking. To be successful with the latter technique we have to restrict the models to finite domains. Therefore we construct suitable abstractions of the scenarios and the system behaviour and verify the abstractions using a model checker. For verifying the general case, symbolic evaluation helps to reduce considerably the number of necessary interactions with an interactive theorem prover. Currently we are integrating these techniques into a user-oriented collaborative development environment.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Robust Controller Design Based-on Aerodynamic Load Simulator Identification Driven by PMSM for Hardware-in-the-Loop Simulations

Aerodynamic load simulators generate the required time varying load to test the actuator’s performance in the laboratory. Electric Load Simulator (ELS) as one of variety of the dynamic load simulators should follows the rotation of the Under Test Actuator (UTA) and applies the desired torque to UTA’s rotor at the same time. In such a situation, a very large torque is imposed to the ELS from the...

متن کامل

An Alternative Stability Proof for Direct Adaptive Function Approximation Techniques Based Control of Robot Manipulators

This short note points out an improvement on the robust stability analysis for electrically driven robots given in the paper. In the paper, the author presents a FAT-based direct adaptive control scheme for electrically driven robots in presence of nonlinearities associated with actuator input constraints. However, he offers not suitable stability analysis for the closed-loop system. In other w...

متن کامل

An Alternative Stability Proof for Direct Adaptive Function Approximation Techniques Based Control of Robot Manipulators

This short note points out an improvement on the robust stability analysis for electrically driven robots given in the paper. In the paper, the author presents a FAT-based direct adaptive control scheme for electrically driven robots in presence of nonlinearities associated with actuator input constraints. However, he offers not suitable stability analysis for the closed-loop system. In other w...

متن کامل

Specification-Driven Design with Eiffel and Agents for Teaching Lightweight Formal Methods

We report on our experiences in teaching lightweight formal methods with Eiffel. In particular, we discuss how we introduce formal methods via Eiffel’s design-by-contract and agent technologies, and how we integrate these techniques with test-driven development, in an approach called specification-driven design. This approach demonstrates how formal methods techniques fit with industrial softwa...

متن کامل

نقش تکنولوژی در بهبود درمان سرطان

One major strategy, technology-driven improvement of treatment conformity in cancer treatment, including advanced image guidance, advanced charged particle therapy (CPT), and application of nanoparticles in hyperthermia, will enable further widening of the therapeutic window of cancer treatment in the era of precision medicine. The state­ of ­the ­art treatment in photon-therapy is advanced 3D...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003